﻿using System;
using System.Collections.Generic;
using System.Text;
using EZBarTender.DataAccess.DAO.EZBTTableAdapters;
using EZBarTender.DataAccess.DAO;
using System.Data.OleDb;
using System.Data;
namespace EZBarTender.DataAccess.Service
{

    public class PrintManagerService
    {
        PrintManagerDisplaysTableAdapter tableAdapter;

        public PrintManagerService(String connectionString)
        {
            tableAdapter = new PrintManagerDisplaysTableAdapter();
            tableAdapter.Connection.ConnectionString = connectionString;
        }

        public void Persist(EZBT ezbt)
        {
            foreach(DataRow row in ezbt.PrintManagerDisplays.Rows)
            {
                Console.WriteLine("PrintManagerDisplaysRow{Upc=" + row["upc"] + ",LocAisle=" + row["LocAisle"] + ",LocBlock=" + row["LocBlock"] + ",LocSeq=" + row["LocSeq"] + "}");
            }
            tableAdapter.Update(ezbt.PrintManagerDisplays);
        }
    }
}
